<!DOCTYPE html>
<html layout:decorate="~{layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<head>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>

    <title th:text="#{screen.unavailable.header}">CAS Error View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag"/>

    <script th:inline="javascript">
        /*<![CDATA[*/

        function showErrorDetails() {
            $("#errorMsg").hide();
            $("#errorDetails").empty();
            $("#errorDetails").append("<p><pre style='white-space: pre-wrap;'>" + /*[[${#strings.escapeXml(trace)}]]*/ +"</pre></p>");
        }
        /*]]>*/
    </script>
</head>

<body>
<main class="container mt-3 mb-3" role="main">
    <div layout:fragment="content">
        <div class="mdc-card p-4 banner banner-danger">
            <h2 th:utext="#{screen.unavailable.heading(${status},${error})}">CAS is unable to process this request:
                "{0}:{1}"</h2>
            <div th:utext="#{screen.unavailable.message}">screen.unavailable.message would go here</div>
            <pre class="mt-4" id="errorMsg" style="white-space: pre-wrap;" th:text="${'Error: ' + message}">error message would go here</pre>
            <p class="word-break-all" id="errorDetails">
                <button class="mdc-button mdc-button--raised" onclick="showErrorDetails();"
                        type="button">
                    <span class="mdc-button__label">View Details</span>
                </button>
            </p>
        </div>
    </div>
</main>
</body>
</html>
